/*
 *
 *    Copyright (c) 2022 Project CHIP Authors
 *
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *        http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 */

// THIS FILE IS GENERATED BY ZAP
// This file is generated from clusters-Attributes.ipp.zapt

#include <clusters/PowerSource/Attributes.h>

#include <app/data-model/Decode.h>
#include <app/data-model/WrappedStructEncoder.h>

namespace chip
{
namespace app
{
	namespace Clusters
	{
		namespace PowerSource
		{
			namespace Attributes
			{
				CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader &reader,
									   const ConcreteAttributePath &path)
				{
					switch (path.mAttributeId) {
					case Attributes::Status::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, status);
					case Attributes::Order::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, order);
					case Attributes::Description::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, description);
					case Attributes::WiredAssessedInputVoltage::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, wiredAssessedInputVoltage);
					case Attributes::WiredAssessedInputFrequency::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, wiredAssessedInputFrequency);
					case Attributes::WiredCurrentType::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, wiredCurrentType);
					case Attributes::WiredAssessedCurrent::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, wiredAssessedCurrent);
					case Attributes::WiredNominalVoltage::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, wiredNominalVoltage);
					case Attributes::WiredMaximumCurrent::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, wiredMaximumCurrent);
					case Attributes::WiredPresent::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, wiredPresent);
					case Attributes::ActiveWiredFaults::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, activeWiredFaults);
					case Attributes::BatVoltage::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, batVoltage);
					case Attributes::BatPercentRemaining::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, batPercentRemaining);
					case Attributes::BatTimeRemaining::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, batTimeRemaining);
					case Attributes::BatChargeLevel::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, batChargeLevel);
					case Attributes::BatReplacementNeeded::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, batReplacementNeeded);
					case Attributes::BatReplaceability::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, batReplaceability);
					case Attributes::BatPresent::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, batPresent);
					case Attributes::ActiveBatFaults::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, activeBatFaults);
					case Attributes::BatReplacementDescription::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, batReplacementDescription);
					case Attributes::BatCommonDesignation::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, batCommonDesignation);
					case Attributes::BatANSIDesignation::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, batANSIDesignation);
					case Attributes::BatIECDesignation::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, batIECDesignation);
					case Attributes::BatApprovedChemistry::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, batApprovedChemistry);
					case Attributes::BatCapacity::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, batCapacity);
					case Attributes::BatQuantity::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, batQuantity);
					case Attributes::BatChargeState::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, batChargeState);
					case Attributes::BatTimeToFullCharge::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, batTimeToFullCharge);
					case Attributes::BatFunctionalWhileCharging::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, batFunctionalWhileCharging);
					case Attributes::BatChargingCurrent::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, batChargingCurrent);
					case Attributes::ActiveBatChargeFaults::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, activeBatChargeFaults);
					case Attributes::EndpointList::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, endpointList);
					case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, generatedCommandList);
					case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, acceptedCommandList);
					case Attributes::AttributeList::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, attributeList);
					case Attributes::FeatureMap::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, featureMap);
					case Attributes::ClusterRevision::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, clusterRevision);
					default:
						return CHIP_NO_ERROR;
					}
				}
			} // namespace Attributes
		} // namespace PowerSource
	} // namespace Clusters
} // namespace app
} // namespace chip
